import request from '../request.js'

const ctxBase = "/base/role"

function addRole(data) {
    return request.post(ctxBase + "/add", data)
}

function updateRole(data) {
    return request.post(ctxBase + "/update", data)
}

function delRole(data) {
    return request.post(ctxBase + "/del/"+data.roleCode)
}

function listRole(data) {
    return request.post(ctxBase + "/list", data)
}

export default {
    addRole, updateRole, delRole, listRole
}
